<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <h:head />
    <h:body>
        <ui:composition template="template.xhtml">
            
            <ui:define name="title">
                Created Events
            </ui:define>
                
            <ui:define name="content">
                <!--______________ MAIN CONTENT ______________-->
                <h:form id="formm">
                    <p:dataTable value="#{createdEventsBean.createdEvents}" var="o"
                                 styleClass="order-table">
                        <f:facet name="header">
                            Created Event
                        </f:facet>
                        <p:column headerText="Name">
                            #{o.name} 
                        </p:column>
                            
                        <p:column headerText="Time Start">
                            #{o.timeStart}
                        </p:column>
                            
                        <p:column headerText="Time End">
                            #{o.timeEnd}
                        </p:column>
                            
                        <p:column headerText="Town">
                            #{o.location}
                        </p:column>
                            
                        <p:column headerText="Modify">
                            <h:commandLink value="Modify Event" action="#{createdEventsBean.showModifyEvent(o, o.acceptedWeatherConditions)}" rendered="#{o.deleted==false}" />
                            <br/>
                            <p:commandLink value="Show Event" action="#{createdEventsBean.showEvent(o)}" rendered="#{o.deleted==false}"/>
                        <h:outputLabel value="DELETED EVENT" rendered="#{o.deleted == true}"/>
                    </p:column>
                        
                </p:dataTable>
                    
                    
            </h:form>
        </ui:define>
            
    </ui:composition>
</h:body>
</html>